<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>title</title>
    <style>
        body {
            padding-top: 50px;
        }
    </style>
</head>

<body>
    <button id="toMini">跳转到小程序</button>
    <button id="openApp">打开app</button>
    <button id="openServe">打开客服</button>
</body>
<script type="text/javascript">
    apiready = function () {
        api.removeLaunchView({
            animation: {
                type: 'fade',
                duration: 500
            }
        });
        document.getElementById('toMini').addEventListener('click', function () {
            var APSocial = api.require('APSocial');
            APSocial.shareText({ 
                text: '我分享的文本'
            }, function(ret, err) {
                if (ret.status) {
                    alert('分享成功');
                } else {
                    alert(err.code);
                }
            });
        })
    };
</script>

</html>